#include "myrectangleitem.h"
#include <QPainter>
MyRectangleItem::MyRectangleItem(QGraphicsItem *parent)
                :MyGraphicItem(parent)
{

}

void MyRectangleItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
    MyGraphicItem::paint(painter, option, widget);
    painter->setRenderHint(QPainter::Antialiasing);  // 开启抗锯齿
    QPen pen(Qt::black);
    pen.setWidth(2);  // 设置画笔宽度
    painter->setPen(pen);
    int radios = 15;
    painter->drawRoundedRect(m_bitemRect, radios, radios);
}
